<?xml version="1.0"?>
<!--
    ***** BEGIN LICENSE BLOCK *****
    
    Copyright © 2009 Center for History and New Media
                     George Mason University, Fairfax, Virginia, USA
                     http://zotero.org
    
    This file is part of Zotero.
    
    Zotero is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    Zotero is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with Zotero.  If not, see <http://www.gnu.org/licenses/>.
    
    ***** END LICENSE BLOCK *****
    Contributed by Julian Onions
-->
<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://zotero-platform/content/zotero.css"?>

<!DOCTYPE window [
	<!ENTITY % cslpreviewDTD SYSTEM "chrome://zotero/locale/cslpreview.dtd"> %cslpreviewDTD;
	<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
]>

<window
	id="csl-preview"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
	onload="Zotero_CSL_Preview.init();"
	title="&styles.preview;">
	
	<script src="chrome://zotero/content/include.js"/>
	<script src="cslpreview.js"/>

	<vbox flex="1">
		<hbox align="center">
			<button id="preview-refresh-button" label="&zotero.general.refresh;" oncommand="Zotero_CSL_Preview.refresh()"/>
			
			<label value="&styles.preview.citationFormat;" />
			<menulist id="citation-format" oncommand="Zotero_CSL_Preview.refresh()" native="true">
				<menupopup>
					<menuitem value="all" label="&styles.preview.citationFormat.all;"/>
					<menuitem value="author" label="&styles.preview.citationFormat.author;"/>
					<menuitem value="author-date" label="&styles.preview.citationFormat.authorDate;"/>
					<menuitem value="label" label="&styles.preview.citationFormat.label;"/>
					<menuitem value="note" label="&styles.preview.citationFormat.note;"/>
					<menuitem value="numeric" label="&styles.preview.citationFormat.numeric;"/>
				</menupopup>
			</menulist>
			
			<menulist id="locale-menu" oncommand="Zotero.Prefs.set('export.lastLocale', this.value); Zotero_CSL_Preview.refresh()" native="true"/>
		</hbox>
		<iframe id="zotero-csl-preview-box" flex="1" overflow="auto" type="content"/>
	</vbox>
	
	<keyset>
		<key id="key_close" key="W" modifiers="accel" oncommand="window.close()"/>
	</keyset>

</window>
